//
//  GroupNet.h
//  SportSocial
//
//  Created by yull on 15/1/16.
//  Copyright (c) 2015年 yull. All rights reserved.
//

#import "BaseNet.h"

@interface GroupNet : BaseNet

+ (AFHTTPRequestOperation *)addNoticeGroupWithId:(UInt64)groupId
                                 successBlock:(httpSuccessBlock)successBlock
                                    failBlock:(httpFailBlock)failBlock;

+ (AFHTTPRequestOperation *)cancelNoticeGroupWithId:(UInt64)groupId
                                       successBlock:(httpSuccessBlock)successBlock
                                          failBlock:(httpFailBlock)failBlock;

+ (AFHTTPRequestOperation *)getNoticeGroupWithSuccessBlock:(httpSuccessBlock)successBlock
                                                 failBlock:(httpFailBlock)failBlock;

+ (AFHTTPRequestOperation *)deleteNoticeGroupWithGroupId:(UInt64)groupId
                                            successBlock:(httpSuccessBlock)successBlock
                                               failBlock:(httpFailBlock)failBlock;

+ (AFHTTPRequestOperation *)getUserGroupWithSuccessBlock:(httpSuccessBlock)successBlock
                                               failBlock:(httpFailBlock)failBlock;

//搜索群/俱乐部
+ (AFHTTPRequestOperation *)searchGroupWithName:(NSString *)groupName
                                     pageNumber:(NSInteger)page
                                       pageSize:(NSInteger)size
                                   successBlock:(httpSuccessBlock)successBlock
                                      failBlock:(httpFailBlock)failBlock;

//查询群资料
+ (AFHTTPRequestOperation *)queryGroupWithGroupId:(UInt64)groupId
                                     successBlock:(httpSuccessBlock)successBlock
                                        failBlock:(httpFailBlock)failBlock;

+ (AFHTTPRequestOperation *)queryGroupUserWithGroupId:(UInt64)groupId
                                         successBlock:(httpSuccessBlock)successBlock
                                            failBlock:(httpFailBlock)failBlock;

//邀请加入群
+ (AFHTTPRequestOperation *)inviteUser:(UInt64)userId
                               toGroup:(UInt64)groupId
                          successBlock:(httpSuccessBlock)successBlock
                             failBlock:(httpFailBlock)failBlock;

//同意邀请
+ (AFHTTPRequestOperation *)agreeInviteWithGroupId:(UInt64)groupId
                                               key:(NSString *)key
                                      successBlock:(httpSuccessBlock)successBlock
                                         failBlock:(httpFailBlock)failBlock;

//拒绝邀请
+ (AFHTTPRequestOperation *)refuseInviteWithGroupId:(UInt64)groupId
                                               key:(NSString *)key
                                      successBlock:(httpSuccessBlock)successBlock
                                         failBlock:(httpFailBlock)failBlock;
//申请加入群
+ (AFHTTPRequestOperation *)applyWithGroupId:(UInt64)groupId
                                successBlock:(httpSuccessBlock)successBlock
                                   failBlock:(httpFailBlock)failBlock;

//同意申请加入
+ (AFHTTPRequestOperation *)agreeApplyWithGroupId:(UInt64)groupId
                                           userId:(UInt64)userId
                                               key:(NSString *)key
                                      successBlock:(httpSuccessBlock)successBlock
                                         failBlock:(httpFailBlock)failBlock;

//拒绝申请加入
+ (AFHTTPRequestOperation *)refuseApplyWithGroupId:(UInt64)groupId
                                            userId:(UInt64)userId
                                                key:(NSString *)key
                                       successBlock:(httpSuccessBlock)successBlock
                                         failBlock:(httpFailBlock)failBlock;

//删除群成员
+ (AFHTTPRequestOperation *)kickUser:(UInt64)userId
                           fromGroup:(UInt64)groupId
                        successBlock:(httpSuccessBlock)successBlock
                           failBlock:(httpFailBlock)failBlock;

//创建群
+ (AFHTTPRequestOperation *)createGroupWithName:(NSString *)name
                                        address:(NSString *)address
                                      longitude:(CGFloat)longitude
                                       latitude:(CGFloat)latitude
                                          annou:(NSString *)annou
                                   successBlock:(httpSuccessBlock)successBlock
                                      failBlock:(httpFailBlock)failBlock;

//更新群信息
+ (AFHTTPRequestOperation *)updateGroupWithGroupId:(UInt64)groupId
                                              name:(NSString *)name
                                             annou:(NSString *)annou
                                      successBlock:(httpSuccessBlock)successBlock
                                         failBlock:(httpFailBlock)failBlock;

//上传群头像
+ (AFHTTPRequestOperation *)uploadGroupIcon:(UIImage *)image
                                    groupId:(UInt64)groupId
                               successBlock:(httpSuccessBlock)successBlock
                                  failBlock:(httpFailBlock)failBlock;

//退出群
+ (AFHTTPRequestOperation *)quitGroupWithGroupId:(UInt64)groupId
                                    successBlock:(httpSuccessBlock)successBlock
                                       failBlock:(httpFailBlock)failBlock;

//解散群
+ (AFHTTPRequestOperation *)dismissGroupWithGroupId:(UInt64)groupId
                                       successBlock:(httpSuccessBlock)successBlock
                                          failBlock:(httpFailBlock)failBlock;

@end
